import { Component, OnInit } from '@angular/core';


import '../../node_modules/bootstrap/dist/css/bootstrap.min.css';
import '../styles/global.css';
import {ButtonTimerComponent} from "./components/example-base-component/button-timer.component";
import {LoginInfoComponent} from "./components/login-info-component/login-info.component";
import {TablesComponent} from "./components/tables/tables.component";
import {SideBarComponent} from "./components/sidebar/sidebar.component";
import {HeaderBarComponent} from "./components/content-bar/header-bar.component";

import {TestQuestionComponent} from "./components/test-questions/test-question.component";
import {ResultQuestionComponent} from "./components/test-questions/result-question.component";
import {RegisterComponent} from "./components/register/register.component";
import { Http, Response } from '@angular/http';


@Component({
  selector: 'app-container',
  template: require('./app.component.html'),
  styles: [require('./app.component.css')],
  directives: [
    ButtonTimerComponent,
    LoginInfoComponent,
    TablesComponent,
    SideBarComponent,
    HeaderBarComponent,
    TestQuestionComponent,
    RegisterComponent,
    ResultQuestionComponent
  ]
})

export class AppComponent implements OnInit {

  constructor(private http:Http) {
    console.log(" AppComponent constructor :", "run step constructor ");
  }

  ngOnInit(){
    console.log("sss");
    this.http.get('http://localhost:8088/rest/index/1').subscribe(res=> console.log(res.json()))
  }
}
